                                   The 2K Key


     There is a ROM available from E&H Systems which replaces the H-27 boot 
ROM and allows you to obtain an extra 2K words (4k bytes) of RAM if your 
memory board can support a 2K word I/O page in addition to the standard 4K I/O 
page.  The ROM moves boot and diagnostic code from below address 170000 
(octal) to above 170000.  If you have no other I/O devices which respond to 
address between 160000 and 167777 then this ROM can considerably help you, 
especially if you use version IV.0.

     The ROM uses a different boot procedure than the standard Heath ROM. 
Instead of letting you specify the device to boot, it tries to boot any
bootable device on line.  This allows the system to boot automatically on 
power-up with no console microcode necessary.  This feature is neat in some
circumstances and a pain in the a** in others.

     The ROM first tries to boot DL0..4: (RL01).  If it doesn't find an RL01 it
tries DK0..7: (RK05).  If that fails it tries DX0..1: (RX01) and then DY0..1:
(RX02). If all of the boots fail, it starts over at RL01.  This sequence can
cause problems. When the ROM tries to boot any of the four devices, it first
looks at unit 0 of the device and then tries unit 1 and so on.  This means that
if, for example, DK0: and DK1: are both bootable, the ROM will always boot DK0
and never even try DK1:.  To boot DK1: or higher, you will must (as I do) enter
the DMA bootstrap instructions by hand into console microcode.  Also if your 
hard disk and floppy come on with the same power switch, and you want to boot
floppy, you had better plug in the floppy before you hard disk controller
signals that it is ready or the system will boot the hard disk.  Then in order
to boot your floppy, you will have to enter the console microcode instructions
(about 30 of them) by hand, or turn your hard disk off and start over.  There
ain't no free lunch.

     There is also a problem with the software bootstrap compatibility and the
2K key, but it can be easily fixed with a simple object patch to the bootstrap.

     When the LSI-11 processor generates an address above 160000, it also
asserts bus line BBS7.  This tells all I/O devices to decode the lower 13 bits
of the address so the one being address can respond.  I/O devices look at line
BBS7 instead of the high order 3 bits (or 5 bits in the case of the 11/23).
Memory on the bus also looks at line BBS7 except that to memory it means ignore
this address.  However, some memory boards such as the Mostek, Chrislin,
Monolithic Memories and others allow a trick to occur.  The standard Heath 16K
boards and all standard DEC boards do not allow this special trick.  

     When a switch or jumper on the memory board is properly set, the memory
board will not ignore addresses between 160000 and 167777 when BBS7 is
asserted.  It will ignore address above 170000 if BBS7 is asserted.  If BBS7
is asserted by the CPU and no I/O device responds to an address in the range
of 160000 to 167777, then no address conflict occurs and memory can legally
respond.  So this "extra" address space, 2K words of it, can be reclaimed for 
system memory.

     There is a hitch however.  The p-system boot code (located in block 0 of 
your system disk) sometimes does not allow the processor to access the memory 
which you have so carefully made free.  This is because it only looks up to
157777 to find the top of memory, as it does not expect to find any in the I/O 
page.  The version II.0 RX01 interpreter handles the memory sizing properly 
and the 2K Key works fine, but none of the other software bootstraps that I
have tested do.

     There is a patch which is simple to do.  You must use PATCH to view block 
0 of your system disk (use a copy in case you screw it up).  You must change a 
word which indicates to highest memory to search from 160000 (octal) to 
170000.  The byte flipped hex pattern which you are looking for is 00E0 and 
you want to change it to 00F0.  The byte offsets (decimal per the PATCH 
display) are shown below for some of the p-system bootstraps.

     version II.0  RK05    offset  282
     version IV.0  RK05    offset  282
     version IV.0  RX01    offset  446
     
     If you want to patch some other bootstrap such as RL01 or RX02, you will 
have to look through every word to find the appropriate pattern and change it.
If your system won't boot, you found the wrong place.

     You should write a simple program BEFORE you make the change to display
the available memory to see if you really got 2048 more words.

     program memtest;
     begin
        writeln;
        write ( memavail );
     end.



                        regards - gws


